#define _CRT_SECURE_NO_WARNINGS 1
struct TreeNode* invertTree(struct TreeNode* root) {
    if (root == NULL)
        return NULL;

    struct TreeNode* R = invertTree(root->right);
    struct TreeNode* L = invertTree(root->left);
    root->left = R;
    root->right = L;

    return root;
}